package com.qyc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qyc.pojo.Batch;
import com.qyc.service.BatchService;
import com.qyc.mapper.BatchMapper;
import com.qyc.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author qinyc
* @description 针对表【manager_batch】的数据库操作Service实现
* @createDate 2023-06-25 11:19:07
*/
@Service
public class BatchServiceImpl extends ServiceImpl<BatchMapper, Batch>
    implements BatchService{

    //注入批次Mapper层对象
    @Autowired
    private BatchMapper batchMapper;

    @Override
    public ResponseResult queryAll() {
        //查询所有批次
        List<Batch> batches = batchMapper.selectList(null);
        //返回统一响应信息
        return ResponseResult.success(batches);
    }
}




